﻿#include "mainwindow.h"
#include "ui_mainwindow.h"
#include "butterfly.h"
#include <QDebug>
#include <QRandomGenerator>

MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent)
    , ui(new Ui::MainWindow)
{
    ui->setupUi(this);
    setWindowFlags(windowFlags() | Qt::FramelessWindowHint);
    setAttribute(Qt::WA_TranslucentBackground);
    showMaximized();
    for(int i = 0;i < 100; i++)
    {
        auto it = new Butterfly(this);
        it->move(QRandomGenerator::global()->bounded(this->width()),QRandomGenerator::global()->bounded(this->height()));
        it->show();
    }
}

MainWindow::~MainWindow()
{
    delete ui;
}



